<template>
  <div>
    <el-divider />
    <h4>Ocular-QMG评分量表</h4>
    <el-form ref="form" :model="form" label-width="140px">
      <el-form-item label="得分">
        <el-input v-model="score" style="width:200px" disabled />
      </el-form-item>
      <el-form-item label="眼睑下垂（上视）:">
        <el-radio-group v-model="form.ocularQmg1">
          <el-radio :label="0">大于60</el-radio>
          <el-radio :label="1">11-60</el-radio>
          <el-radio :label="2">1-10</el-radio>
          <el-radio :label="3">自发</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="左凝视:">
        <el-radio-group v-model="form.ocularQmg2">
          <el-radio :label="0">大于60</el-radio>
          <el-radio :label="1">11-60</el-radio>
          <el-radio :label="2">1-10</el-radio>
          <el-radio :label="3">自发</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="右凝视:">
        <el-radio-group v-model="form.ocularQmg3">
          <el-radio :label="0">大于60</el-radio>
          <el-radio :label="1">11-60</el-radio>
          <el-radio :label="2">1-10</el-radio>
          <el-radio :label="3">自发</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="上凝视:">
        <el-radio-group v-model="form.ocularQmg4">
          <el-radio :label="0">大于60</el-radio>
          <el-radio :label="1">11-60</el-radio>
          <el-radio :label="2">1-10</el-radio>
          <el-radio :label="3">自发</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="下凝视:">
        <el-radio-group v-model="form.ocularQmg5">
          <el-radio :label="0">大于60</el-radio>
          <el-radio :label="1">11-60</el-radio>
          <el-radio :label="2">1-10</el-radio>
          <el-radio :label="3">自发</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="眼睑闭合">
        <el-radio-group v-model="form.ocularQmg6">
          <el-radio :label="0">正常</el-radio>
          <el-radio :label="1">闭合（抵抗部分阻力）</el-radio>
          <el-radio :label="2">闭合（不能抵抗阻力）</el-radio>
          <el-radio :label="3">不能闭合</el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        ocularQmg1: 0,
        ocularQmg2: 0,
        ocularQmg3: 0,
        ocularQmg4: 0,
        ocularQmg5: 0,
        ocularQmg6: 0,
        pId: this.pId,
        id: ''
      }
    }
  },
  inject: [
    'pId'
  ],
  computed: {
    score() {
      var sum = Object.values(this.form).reduce((x, y) => x + y)
      return sum
    }
  }
}
</script>

<style>

</style>
